package tman.system.peer.tman;

import java.util.List;

import common.peer.PeerAddress;
import common.peer.PeerInfo;
import common.peer.PeerMessage;

public class TManChildResponse extends PeerMessage {

        private static final long serialVersionUID = -7784983667122039670L;
       
        private PeerInfo child;
        private boolean accepts;
        private Integer parentPreference;

        public TManChildResponse(PeerAddress source, PeerAddress destination, PeerInfo child, boolean accepts) {
                super(source, destination);
                this.accepts = accepts;
                this.child = child;
                this.parentPreference = 0;
        }
        
        public boolean isAccepting()
        {
        	return accepts;
        }
        
        public void setParentPreference(Integer pp)
        {
        	this.parentPreference = pp;
        }
       
        public PeerInfo getChildInfo() {
                return child;
        }
        
        public Integer getParentPreference() {
        	return parentPreference;
        }

}
